import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "Mxpio Boot",
  description: "基于 Spring Boot 研发的开发框架",
  head: [
    // 添加favicon链接
    ['link', { rel: 'icon', href: '/public/favicon.ico' }]
  ],
  themeConfig: {
    logo: "/logo.png",
    outlineTitle: "导航目录",
    outline: "deep",
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      {
        text: "指南",
        items: [
          { text: "介绍", link: "/start/introduction" },
          { text: "模块说明", link: "/modules/security" },
          { text: "前端文档", link: "/guide/directory" },
        ],
      },
      {
        text: "代码",
        items: [
          {
            text: "前端项目",
            link: "https://gitee.com/i_mxpio/mxpio-boot-antd-vue.git",
          },
          {
            text: "后端项目",
            link: "https://gitee.com/i_mxpio/mxpio-boot.git",
          },
          {
            text: "uniapp",
            link: "https://gitee.com/glf_gao/mxpio-app.git",
          },
        ]
      },
    ],
    sidebar: [
      {
        text: "快速开始",
        collapsed: false,
        items: [
          { text: "平台简介", link: "/start/introduction" },
          { text: "功能简介", link: "/start/info" },
          { text: "快速开始", link: "/start/start" },
        ],
      },
      {
        text: "部署说明",
        collapsed: false,
        items: [
          { text: "常规部署", link: "/deploy/routine" },
          { text: "容器部署", link: "/deploy/container" },
        ],
      },
      {
        text: "模块说明",
        collapsed: false,
        link: "/modules/security",
        items: [
          { text: "权限模块", link: "/modules/security" },
          { 
            text: "工作流模块", 
            // link: "/flow/flow",
            collapsed: true,
            items: [
              { text: "介绍", link: "/flow/flow" },
              { text: "表单设计器",link: "/flow/form",
                items:[
                  {text:'设计器介绍',link: "/flow/form"},
                  { text: "自定义组件", link: "/flow/customCom" },
                  { text: "自定义表单", link: "/flow/customForm" },
                ],  
              },
              { text: "流程设计器", link: "/flow/bpmn" },
              { text: "流程使用", link: "/flow/apply",items:[
                {text:'发起', link: "/flow/apply" },
                {text:'办理', link: "/flow/task" }
              ]},
              { text: "进阶",link: "/flow/IntegrationFlow", items:[
                {text:'业务单集成',link: "/flow/IntegrationFlow"}
              ] }
            ]
          },
          { text: "调度模块", link: "/modules/quartz" },
          { text: "Excel模块", link: "/modules/excel" },
          { text: "消息模块", link: "/modules/message" },
          { text: "云数据库", link: "/modules/dbconsole" },
          { text: "多租户", link: "/modules/multitenant" },
        ],
      },
      {
        text: "后端组件",
        collapsed: false,
        items: [
          { text: "ORM组件", link: "/backstage/jpa" },
          { text: "缓存组件", link: "/backstage/cache" },
          { text: "表达式引擎", link: "/backstage/expression" },
          { text: "Spring自动装配", link: "/backstage/autoconfigure" },
          { text: "自定义模块开发说明", link: "/backstage/custom" },
        ],
      },
      {
        text: "前台文档",
        collapsed: false,
        link: "/guide/directory",
        items: [
          {
            text: "指南",
            collapsed: true,
            items: [
              { text: "项目结构", link: "/guide/directory" },
              { text: "构建 & 部署", link: "/guide/deploy" },
              { text: "配置", link: "/guide/config" },
              { text: "主题定制", link: "/guide/theme" },
            ],
          },
          {
            text: "系统功能",
            collapsed: true,
            link: "/system/menu",
            items: [
              { text: "菜单", link: "/system/menu" },
              { text: "权限", link: "/system/auth" },
              { text: "单点登录", link: "/system/loginSSO" },
              { text: "国际化", link: "/system/i18n" },
              { text: "导入", link: "/system/import" },
              { text: "导出", link: "/system/export" }
            ],
          },
          {
            text: "前端组件",
            collapsed: true,
            items: [
              { text: "字典组件", link: "/components/dict" },
              { text: "字典组件(多选)", link: "/components/dictMulti" },
              { text: "下拉选择(分页)", link: "/components/zAsyncSelect" },
              { text: "下拉选择", link: "/components/zSyncSelectTag" },
              { text: "高级查询", link: "/components/superQuery" },
              { text: "上传组件", link: "/components/upload" },
              { text: "图片上传", link: "/components/imageUpload" },
              { text: "用户选择", link: "/components/user" },
              { text: "用户选择(按部门)", link: "/components/userByDept" },
              { text: "部门选择", link: "/components/dept" },
              { text: "表格组件", link: "/components/vxetable" },
            ],
          },
          {
            text: "通用方法",
            collapsed: true,
            items: [
              { text: "请求封装", link: "/utils/api" },
              { text: "查询构造器", link: "/utils/criteria" }
            ]
          },
        ],
      },
      {
        text: "其它",
        collapsed: false,
        items: [
          { text: "常见问题", link: "/other/faq" }
        ]
      }
    ]
  }
})
